home *** CD-ROM | disk | FTP | other *** search
/ FM Towns: Free Software Collection 9 / FM Towns Free Software Collection 9.iso / t_os / shell / igo / gosource / ban.c next >
Encoding:
C/C++ Source or Header  |  1994-11-16  |  841 b   |  41 lines

  1. #define DEBUG 0
  2. /* 
  3.   TOWNS囲碁棋譜記録プログラム ban.c
  4.   1992/07/06  久保田俊也
  5.   
  6.   */
  7. #include <stdio.h>
  8. #include <time.h>
  9. #include <string.h>
  10. #include "igo.h"
  11. #include "banx.h"
  12. #include "title.h"
  13.  
  14. int ban_init(char current_ban[])
  15. {
  16.     int i, j;
  17.     BAN_TYPE ban_type;
  18.     int bansize, bansize2, up, down;
  19.     
  20.     Debugprint("igo:ban_init() start!\n");
  21.     ban_type = *title_bantype_read();
  22.     if( ban_type.type == NORMAL){
  23.         bansize = ban_type.size;
  24.         bansize2 = (bansize+1)*(bansize+2)+1;
  25.         up = -(bansize+1);
  26.         down = (bansize+1);
  27.     }
  28.     
  29.     for(i=0;i<bansize2;i++){
  30.         current_ban[i] = WALL;
  31.     }
  32.     for(i=1;i<(bansize+1);i++){
  33.         for(j=1;j<(bansize+1);j++){
  34.             current_ban[j + i*(bansize+1)] = BLANK;     
  35.         }
  36.     }
  37.     
  38.     return 0;
  39. }
  40.  
  41.